package com.pentofab.payrollmanagement.dao.model;

import java.util.ArrayList;

public class SalaryAdvanceDetail {

	public int getRowNum() {
		return rowNum;
	}

	public void setRowNum(int rowNum) {
		this.rowNum = rowNum;
	}

	public String getEmployeeIdCol() {
		return employeeIdCol;
	}

	public void setEmployeeIdCol(String employeeId) {
		this.employeeIdCol = employeeId;
	}

	private String advAmt;
	private String balance;
	private int rowNum;
	private String employeeIdCol;


	public SalaryAdvanceDetail(String noOfEMI, String startDate, String advAmt, String endDate,String balance,
			String emiAmountCol, int rowNo, String empId) {
		
		this.advAmt = advAmt;
		this.balance = balance;
		this.rowNum = rowNo;
		this.employeeIdCol = empId;
		
	}
	

	public String getAdvAmt() {
		return advAmt;
	}

	public void setAdvAmt(String advAmt) {
		this.advAmt = advAmt;
	}

	public String getBalance() {
		return balance;
	}

	public void setBalance(String balance) {
		this.balance = balance;
	}

	
	public static ArrayList<SalaryAdvanceDetail> getSalaryAdvanceDetailLisy(ArrayList<SalaryAdvance> slaryList){
		
		if(slaryList == null){
			return null;
		}
		ArrayList<SalaryAdvanceDetail> detailList = new ArrayList<SalaryAdvanceDetail>();
		for (int i = 0; i < slaryList.size(); i++) {
			
			SalaryAdvance advance = slaryList.get(i);
			detailList.add(new SalaryAdvanceDetail(advance.getNoOfEMI(), advance.getStartDate(), advance.getAdvance(),
					advance.getEndDate(),advance.getBalance(),advance.getEmiAmount(),advance.getRownum(),advance.getEmployeeId()));
		}
		return detailList;
	}

}
